<template>
  <div class="container-i">
    <Breadcrumb :items="['个人中心', '用户信息']" />
    <UserInfoHeader />
    <div class="content">
      <div class="content-left">
        <a-grid :cols="24" :col-gap="16" :row-gap="16">
          <a-grid-item :span="24">
            <user-posts />
          </a-grid-item>
          <a-grid-item :span="24">
            <has-do-problems />
          </a-grid-item>
        </a-grid>
      </div>
      <div class="content-right">
        <a-grid :cols="24" :row-gap="16">
          <a-grid-item :span="24">
            <thumb-posts />
          </a-grid-item>
          <a-grid-item class="panel" :span="24">
            <favour-posts />
          </a-grid-item>
        </a-grid>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import UserInfoHeader from './components/user-info-header.vue';
import UserPosts from '@/views/user/info/components/user-posts.vue';
import HasDoProblems from '@/views/user/info/components/has-do-problems.vue';
import ThumbPosts from '@/views/user/info/components/thumb-posts.vue';
import FavourPosts from '@/views/user/info/components/favour-posts.vue';
</script>

<script lang="ts">
export default {
  name: 'Info'
};
</script>

<style scoped lang="less">
.container-i {
  padding: 0 20px 20px;
  max-width: 1400px;
  margin: 0 auto;

  :deep(.arco-breadcrumb) {
    margin-bottom: 16px;
  }
}

.content {
  display: flex;
  margin-top: 20px;
  gap: 24px;

  &-left {
    flex: 1;
    min-width: 0;

    :deep(.general-card) {
      transition: all 0.3s ease;
      background-color: var(--color-bg-2);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

      &:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(39, 89, 205, 0.1);
      }

      .arco-card-header {
        border-bottom: 1px solid var(--color-border-2);

        .arco-card-header-title {
          font-weight: 600;
          font-size: 16px;
          color: #2759cd;
        }
      }

      .arco-card-body {
        padding: 16px 20px;
      }
    }
  }

  &-right {
    width: 340px;

    :deep(.general-card) {
      transition: all 0.3s ease;
      background-color: var(--color-bg-2);
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

      &:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(39, 89, 205, 0.1);
      }

      .arco-card-header {
        border-bottom: 1px solid var(--color-border-2);
      }

      .arco-list-item {
        transition: background-color 0.2s ease;
        border-radius: 4px;
        margin: 4px 0;

        &:hover {
          background-color: rgba(39, 89, 205, 0.05);
        }
      }
    }
  }

  :deep(.arco-link) {
    color: #2759cd;
    font-weight: 500;
    transition: color 0.2s ease;

    &:hover {
      color: #3769dd;
    }
  }

  :deep(.arco-input-search) {
    .arco-btn-primary {
      background-color: #2759cd;
      border-color: #2759cd;

      &:hover {
        background-color: #3769dd;
        border-color: #3769dd;
      }
    }
  }

  :deep(.arco-avatar) {
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  :deep(.arco-result) {
    padding: 30px 0;
  }
}

// 适配移动端
@media (max-width: 768px) {
  .content {
    flex-direction: column;

    &-left {
      margin-right: 0;
      margin-bottom: 24px;
    }

    &-right {
      width: 100%;
    }
  }
}
</style>

<style lang="less" scoped>
.container-i {
  padding: 0 20px 20px;
}

.mobile {
  .content {
    display: block;

    &-left {
      margin-right: 0;
      margin-bottom: 16px;
    }

    &-right {
      width: 100%;
    }
  }
}
</style>
